<?php

namespace PT\TestBundle\Controller;

use PT\TestBundle\Entity\Commentaire;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;

class DefaultController extends Controller
{
    public function indexAction()
    {
    	
    	$repository = $this
    	->getDoctrine()
    	->getManager()
    	->getRepository('PTTestBundle:Commentaire')
    	;
    	
    	$listCommentaires = $repository->findAll();
    	
    	return $this->render('PTTestBundle:Default:index.html.twig', array(
    			'listCommentaires' => $listCommentaires
    	));
    	
    }
}
